import 'package:flutter/material.dart';
import 'package:flutter_09_game/base/controller/base_controller.dart';
import 'package:flutter_09_game/base/controller/base_list_controller.dart';
import 'package:flutter_09_game/user/app_user_manager.dart';
import 'package:flutter_09_game/user/model/model_user_wallet.dart';
import 'package:flutter_09_game/widgets/dialog/common_normal_sheet.dart';
import 'package:get/get.dart';

class ProfileLogic extends BaseController {
  @override
  void onInit() {
    super.onInit();
    // 初始化我的页面数据
  }

  @override
  void onReady() {
    super.onReady();
    // 页面准备就绪时的操作
  }

  @override
  void onClose() {
    super.onClose();
    // 页面关闭时的清理操作
  }

  // walletList
  beginWalletAnimated() {
    List<ModelUserWallet> walletList = AppUserManager().walletList.toList();

    AppUserManager().walletList.value = [];
    WidgetsBinding.instance.addPostFrameCallback((_) {
      AppUserManager().walletList.value = walletList;
    });
  }
}
